/*
 * @Author: Aro
 * @Date: 2024-01-30 09:08:10
 */
import 'package:flutter/material.dart';
import 'package:flutter_baseui/routers/fluro_navigator.dart';
import 'package:flutter_baseui/widgets/model/icon_event_model.dart';
import 'package:flutter_baseui/widgets/nav_bar_kit.dart';

class RouterComplexParamsDemo extends StatefulWidget {
  const RouterComplexParamsDemo({
    super.key,
    this.username = '',
    this.id = '',
  });
  final String? username;
  final String? id;

  @override
  State<RouterComplexParamsDemo> createState() => _RouterComplexParamsDemo();
}

class _RouterComplexParamsDemo extends State<RouterComplexParamsDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xFFEDF0F2),
      body: Column(
        children: [
          NavBarKit(
            title: '路由简易参数获取',
            leftConfig: IconEventModel(
              icon: const Icon(Icons.arrow_back),
              onTap: () {
                FluroNaviagtor.goBack(context);
              },
            ),
          ),
          Text(
            '路由传过来的参数 ${widget.username} ${widget.id}',
            style: const TextStyle(fontSize: 20),
          ),
        ],
      ),
    );
  }
}
